import Vue from 'vue'
import Vuex from 'vuex'
import VirtualList from '@tarojs/components/virtual-list'
import './app.scss'

Vue.use(VirtualList)

const store = new Vuex.Store({
  state: {
    thread: {}
  },
  mutations: {
    setThread: (state, thread) => {
      state.thread = { ...thread }
    }
  }
})
/**
 * created()生命周期方法对应app的onLaunch 
 */
const App = new Vue({
  store,
  render(h) {
    // this.$slots.default 是将要会渲染的页面
    return h('block', this.$slots.default)
  }
})

export default App
